<?php
	//
	//This php will handle the 
	// UserFetch.java 
	// - fetchUserById function
	//
	
	//Connect to database
	include '../../dbc.php';
	
	$id = $_POST['id'];
	
	//Check is activated
    $query01 = "SELECT * FROM user WHERE id = '$id'";
	$query01_result = mysql_query($query01);
	if(mysql_num_rows($query01_result) == 1){
		$query01_result_row = mysql_fetch_array($query01_result);
		$name = $query01_result_row['name'];
		$description = $query01_result_row['description'];
		$profile_picture = $query01_result_row['profile_picture'];
		
		$response["STATUS"] = "1";
		$response["NAME"] = $name;
		$response["DESCRIPTION"] = $description;
		$response["PROFILE_PICTURE"] = $profile_picture;
		echo json_encode($response);
	}else{
		//Unable to get user
		$response["STATUS"] = "0";
		echo json_encode($response);
	}
	

?>